\doxysection{BMI088driver.\+h}
\hypertarget{_b_m_i088driver_8h_source}{}\label{_b_m_i088driver_8h_source}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/modules/imu/BMI088driver.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/modules/imu/BMI088driver.h}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ BMI088DRIVER\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ BMI088DRIVER\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}stdint.h"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{main_8h}{main.h}}"{}}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#define\ BMI088\_TEMP\_FACTOR\ 0.125f}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#define\ BMI088\_TEMP\_OFFSET\ 23.0f}}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#define\ BMI088\_WRITE\_ACCEL\_REG\_NUM\ 6}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#define\ BMI088\_WRITE\_GYRO\_REG\_NUM\ 6}}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#define\ BMI088\_GYRO\_DATA\_READY\_BIT\ 0}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#define\ BMI088\_ACCEL\_DATA\_READY\_BIT\ 1}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#define\ BMI088\_ACCEL\_TEMP\_DATA\_READY\_BIT\ 2}}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#define\ BMI088\_LONG\_DELAY\_TIME\ 80}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#define\ BMI088\_COM\_WAIT\_SENSOR\_TIME\ 150}}
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#define\ BMI088\_ACCEL\_IIC\_ADDRESSE\ (0x18\ <<\ 1)}}
\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#define\ BMI088\_GYRO\_IIC\_ADDRESSE\ (0x68\ <<\ 1)}}
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#define\ BMI088\_ACCEL\_3G\_SEN\ 0.0008974358974f}}
\DoxyCodeLine{00024\ \textcolor{preprocessor}{\#define\ BMI088\_ACCEL\_6G\_SEN\ 0.00179443359375f}}
\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#define\ BMI088\_ACCEL\_12G\_SEN\ 0.0035888671875f}}
\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#define\ BMI088\_ACCEL\_24G\_SEN\ 0.007177734375f}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \textcolor{preprocessor}{\#define\ BMI088\_GYRO\_2000\_SEN\ 0.00106526443603169529841533860381f}}
\DoxyCodeLine{00029\ \textcolor{preprocessor}{\#define\ BMI088\_GYRO\_1000\_SEN\ 0.00053263221801584764920766930190693f}}
\DoxyCodeLine{00030\ \textcolor{preprocessor}{\#define\ BMI088\_GYRO\_500\_SEN\ 0.00026631610900792382460383465095346f}}
\DoxyCodeLine{00031\ \textcolor{preprocessor}{\#define\ BMI088\_GYRO\_250\_SEN\ 0.00013315805450396191230191732547673f}}
\DoxyCodeLine{00032\ \textcolor{preprocessor}{\#define\ BMI088\_GYRO\_125\_SEN\ 0.000066579027251980956150958662738366f}}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ \textcolor{comment}{//\ {\ucr}{\ucr}{\ucr}ֶ{\ucr}{\ucr}޸{\ucr}}}
\DoxyCodeLine{00035\ \textcolor{preprocessor}{\#if\ INFANTRY\_ID\ ==\ 0}}
\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#define\ GxOFFSET\ 0.00247530174f}}
\DoxyCodeLine{00037\ \textcolor{preprocessor}{\#define\ GyOFFSET\ 0.000393082853f}}
\DoxyCodeLine{00038\ \textcolor{preprocessor}{\#define\ GzOFFSET\ 0.000393082853f}}
\DoxyCodeLine{00039\ \textcolor{preprocessor}{\#define\ gNORM\ 9.69293118f}}
\DoxyCodeLine{00040\ \textcolor{preprocessor}{\#elif\ INFANTRY\_ID\ ==\ 1}}
\DoxyCodeLine{00041\ \textcolor{preprocessor}{\#define\ GxOFFSET\ 0.0007222f}}
\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#define\ GyOFFSET\ -\/0.001786f}}
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\#define\ GzOFFSET\ 0.0004346f}}
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#define\ gNORM\ 9.876785f}}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#elif\ INFANTRY\_ID\ ==\ 2}}
\DoxyCodeLine{00046\ \textcolor{preprocessor}{\#define\ GxOFFSET\ 0.0007222f}}
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#define\ GyOFFSET\ -\/0.001786f}}
\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#define\ GzOFFSET\ 0.0004346f}}
\DoxyCodeLine{00049\ \textcolor{preprocessor}{\#define\ gNORM\ 9.876785f}}
\DoxyCodeLine{00050\ \textcolor{preprocessor}{\#elif\ INFANTRY\_ID\ ==\ 3}}
\DoxyCodeLine{00051\ \textcolor{preprocessor}{\#define\ GxOFFSET\ 0.00270364084f}}
\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#define\ GyOFFSET\ -\/0.000532632112f}}
\DoxyCodeLine{00053\ \textcolor{preprocessor}{\#define\ GzOFFSET\ 0.00478090625f}}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#define\ gNORM\ 9.73574924f}}
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\#elif\ INFANTRY\_ID\ ==\ 4}}
\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#define\ GxOFFSET\ 0.0007222f}}
\DoxyCodeLine{00057\ \textcolor{preprocessor}{\#define\ GyOFFSET\ -\/0.001786f}}
\DoxyCodeLine{00058\ \textcolor{preprocessor}{\#define\ GzOFFSET\ 0.0004346f}}
\DoxyCodeLine{00059\ \textcolor{preprocessor}{\#define\ gNORM\ 9.876785f}}
\DoxyCodeLine{00060\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{comment}{/*\ IMU数据结构体\ */}}
\DoxyCodeLine{00063\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{00064\ \{}
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keywordtype}{float}\ Accel[3];}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keywordtype}{float}\ Gyro[3];}
\DoxyCodeLine{00068\ }
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keywordtype}{float}\ TempWhenCali;}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keywordtype}{float}\ Temperature;}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keywordtype}{float}\ AccelScale;}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keywordtype}{float}\ GyroOffset[3];}
\DoxyCodeLine{00074\ }
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keywordtype}{float}\ gNorm;}
\DoxyCodeLine{00076\ \}\ \mbox{\hyperlink{struct_i_m_u___data__t}{IMU\_Data\_t}};}
\DoxyCodeLine{00077\ }
\DoxyCodeLine{00078\ \textcolor{comment}{/*\ BMI088错误码枚举\ */}}
\DoxyCodeLine{00079\ \textcolor{keyword}{enum}}
\DoxyCodeLine{00080\ \{}
\DoxyCodeLine{00081\ \ \ \ \ BMI088\_NO\_ERROR\ =\ 0x00,}
\DoxyCodeLine{00082\ \ \ \ \ BMI088\_ACC\_PWR\_CTRL\_ERROR\ =\ 0x01,}
\DoxyCodeLine{00083\ \ \ \ \ BMI088\_ACC\_PWR\_CONF\_ERROR\ =\ 0x02,}
\DoxyCodeLine{00084\ \ \ \ \ BMI088\_ACC\_CONF\_ERROR\ =\ 0x03,}
\DoxyCodeLine{00085\ \ \ \ \ BMI088\_ACC\_SELF\_TEST\_ERROR\ =\ 0x04,}
\DoxyCodeLine{00086\ \ \ \ \ BMI088\_ACC\_RANGE\_ERROR\ =\ 0x05,}
\DoxyCodeLine{00087\ \ \ \ \ BMI088\_INT1\_IO\_CTRL\_ERROR\ =\ 0x06,}
\DoxyCodeLine{00088\ \ \ \ \ BMI088\_INT\_MAP\_DATA\_ERROR\ =\ 0x07,}
\DoxyCodeLine{00089\ \ \ \ \ BMI088\_GYRO\_RANGE\_ERROR\ =\ 0x08,}
\DoxyCodeLine{00090\ \ \ \ \ BMI088\_GYRO\_BANDWIDTH\_ERROR\ =\ 0x09,}
\DoxyCodeLine{00091\ \ \ \ \ BMI088\_GYRO\_LPM1\_ERROR\ =\ 0x0A,}
\DoxyCodeLine{00092\ \ \ \ \ BMI088\_GYRO\_CTRL\_ERROR\ =\ 0x0B,}
\DoxyCodeLine{00093\ \ \ \ \ BMI088\_GYRO\_INT3\_INT4\_IO\_CONF\_ERROR\ =\ 0x0C,}
\DoxyCodeLine{00094\ \ \ \ \ BMI088\_GYRO\_INT3\_INT4\_IO\_MAP\_ERROR\ =\ 0x0D,}
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00096\ \ \ \ \ BMI088\_SELF\_TEST\_ACCEL\_ERROR\ =\ 0x80,}
\DoxyCodeLine{00097\ \ \ \ \ BMI088\_SELF\_TEST\_GYRO\_ERROR\ =\ 0x40,}
\DoxyCodeLine{00098\ \ \ \ \ BMI088\_NO\_SENSOR\ =\ 0xFF,}
\DoxyCodeLine{00099\ \};}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00101\ \textcolor{keyword}{extern}\ \mbox{\hyperlink{struct_i_m_u___data__t}{IMU\_Data\_t}}\ BMI088;}
\DoxyCodeLine{00102\ }
\DoxyCodeLine{00110\ \textcolor{keyword}{extern}\ uint8\_t\ BMI088Init(\mbox{\hyperlink{group___s_p_i___exported___types_gab633e49dd034de2f3a1fe79853d78d18}{SPI\_HandleTypeDef}}\ *bmi088\_SPI,\ uint8\_t\ calibrate);}
\DoxyCodeLine{00111\ }
\DoxyCodeLine{00117\ \textcolor{keyword}{extern}\ uint8\_t\ bmi088\_accel\_init(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00118\ }
\DoxyCodeLine{00124\ \textcolor{keyword}{extern}\ uint8\_t\ bmi088\_gyro\_init(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00125\ }
\DoxyCodeLine{00131\ \textcolor{keyword}{extern}\ \textcolor{keywordtype}{void}\ BMI088\_Read(\mbox{\hyperlink{struct_i_m_u___data__t}{IMU\_Data\_t}}\ *bmi088);}
\DoxyCodeLine{00132\ }
\DoxyCodeLine{00133\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
